package com.ziyan.error;

public enum ErrorCode {
    system_error(0, "系统错误"),
    invalid_params(1, "非法参数"),
    miss_param(2,"缺失参数"),
    short_url_not_found(3,"短链接不存在"),
    already_short_url(4,"已经是短链接"),
    test_limit(5,"该测试号每天限制1000条，需要更多资讯qq:434595824"),
    ;

    private ErrorCode(int code, String message) {
        this.code = code + offset;
        this.message = message;
    }

    private int code;
    private String message;
    private static final int offset = 10000;

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
